# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""

from django.http import HttpResponse
from django.template import loader


def bad_request(request, exception):
    context = {'segment': 'index'}
    html_template = loader.get_template('error/page-400.html')
    return HttpResponse(html_template.render(context, request))

def permission_denied(request, exception):
    context = {'segment': 'index'}
    html_template = loader.get_template('error/page-403.html')
    return HttpResponse(html_template.render(context, request))

def page_not_found(request, exception):
    context = {'segment': 'index'}
    html_template = loader.get_template('error/page-404.html')
    return HttpResponse(html_template.render(context, request))

def server_error(request):
    context = {'segment': 'index'}
    html_template = loader.get_template('error/page-500.html')
    return HttpResponse(html_template.render(context, request))
